package com.stone.business.gzjl.Action;

/**
 * <pre>
 * 变电运行工区工作任务单 
 * @author
 * </pre>
 */

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.stone.business.gzjl.pojo.TabGzjl;
import com.stone.business.jc.service.JcCommonService;
import com.stone.utils.StringUtils;

import frm.ssh.action.BaseListAction;

@SuppressWarnings("serial")
public class GzjlListAction extends BaseListAction {

	private JcCommonService myService;
	
	public JcCommonService getMyService() {
		return myService;
	}

	public void setMyService(JcCommonService myService) {
		this.service = myService;
		this.myService = myService;
	}
	
    /** * 构造方法. */
    public GzjlListAction() {
        this.entityClass = TabGzjl.class;
    }

	/**
	 * 设置查询条件
	 */
	public HashMap<String, Object> setSearchCondition() {
		
		HashMap<String, Object> m = new HashMap<String, Object>();
		List<Object> valsList = new ArrayList<Object>();
		String conditions = " 1 = 1";
		
		if (!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon3())) {
			conditions += " AND a.bzlb= ?";
			valsList.add(super.getSearchBean().getCon3());
		}
		if (!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon4())) {
			conditions += " AND a.gzrwdid= ?";
			valsList.add(super.getSearchBean().getCon3());
		}
		if (!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon5())) {
			conditions += " AND a.fzr like ?";
			valsList.add("%" + super.getSearchBean().getCon3() + "%");
		}				
		// 查询条件
		m.put("conditions",conditions);
		m.put("clause", " order by a.kssj Desc");
		m.put("alias", "a");
		m.put("vals", valsList.toArray());
		
		
		
		return m;
		
	}


}
